package com.kakarote.job.admin;

import com.kakarote.core.feign.admin.service.AdminService;
import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.handler.annotation.XxlJob;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;


/**
 * 根据订单的超时时间来关闭订单
 */
@Component
@Slf4j
public class AdminOrderCloseJob {

    @Autowired
    private AdminService adminService;


    @XxlJob("AdminOrderCloseJob")
    public ReturnT<String> closeOrder(String param) {
        adminService.queryApplyOrderByStatusAndCloseTime();
        return ReturnT.SUCCESS;
    }

}
